﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;

namespace LizardSoft.Common.FlexibleStructureDeployment
{
    internal class FieldDependancyInfo
    {
        public SPField Field { get; set; }
        public bool IsDependent { get; set; }
    }

    internal class FieldDependancyInfoComparer : IComparer<FieldDependancyInfo>
    {
        public int Compare(FieldDependancyInfo a, FieldDependancyInfo b)
        {
            if (!a.IsDependent && b.IsDependent) return 1;
            if (a.IsDependent && !b.IsDependent) return -1;            
            return 0;
        }
    }
}
